//

#include "base.hpp"
#include "testdialog.hpp"
#include "game.hpp"
#include "gameview.hpp"
#include "scene.hpp"

using namespace wtk;



static constexpr wgl::WindowSettings WINDOW_SETTINGS
  {
    640,
    480,
    false, // fullscreen
    false, // desktop_fullscreen
    true,  // vsync
  };



// main
//
int main ( int argc,
           char *argv[] )
{
  Application app{};
  app.enable_application_layers({
      "WGL_LAYER_debug",
    });

  Game game{};

  game.init();
  
  Display display{WINDOW_SETTINGS};
  
  GameView game_view{display, game.get_scene()};
  display.set_top_widget_layout(game_view, true);
  game_view.show_all();
  game_view.set_focus();

  BinLayout dialog_layout{};
  TestDialog dialog{display};
  dialog.set_layout(dialog_layout);  
  Label label{&dialog, "Heljo Worlq!!!"};
  dialog.show_all();

  display.open();
  return app.main();
}
